<form id="add-form" class="form-horizontal form-ajax" role="form" data-toggle="validator" method="POST" action="">
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Group')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_select('group[]', $groupdata, null, ['class'=>'form-control selectpicker', 'multiple'=>'', 'data-rule'=>'required'])}
        </div>
    </div>
    <div class="form-group">
        <label for="username" class="control-label col-xs-12 col-sm-2">{:__('Username')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" class="form-control" id="username" name="row[username]" value="" data-rule="required;username" />
        </div>
    </div>
    <div class="form-group">
        <label for="email" class="control-label col-xs-12 col-sm-2">{:__('Email')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="email" class="form-control" id="email" name="row[email]" value="" data-rule="required;email" />
        </div>
    </div>
    <div class="form-group">
        <label for="nickname" class="control-label col-xs-12 col-sm-2">{:__('Nickname')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" class="form-control" id="nickname" name="row[nickname]" autocomplete="off" value="" data-rule="required" />
        </div>
    </div>
    <div class="form-group">
        <label for="password" class="control-label col-xs-12 col-sm-2">{:__('Password')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="password" class="form-control" id="password" name="row[password]" autocomplete="new-password" value="" data-rule="required;password" />
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('身份')}:</label>
        <div class="col-xs-12 col-sm-8">
            <select id="c-identity" data-rule="required" class="form-control selectpicker" name="row[identity]">
                <option value="1">区域管理员</option>
                <option value="2">盒子负责人</option>
            </select>
        </div>
    </div>
    <div id="c-city-div" class="form-group" >
        <label class="control-label col-xs-12 col-sm-2">{:__('权限范围')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="form-inline" data-toggle="cxselect" data-selects="province,city,area,quarters_id,unit_id,room_id">
                <select id="c-province" class="province form-control have-goods" name="province" data-url="ajax/area" >
                </select>
                <select id="c-city"  class="city form-control have-goods" name="city" data-url="ajax/area" >
                </select>
                <select id="c-area"  class="area form-control have-goods" name="area" data-url="ajax/area" >
                </select>
                <select id="c-quarters"  class="quarters_id form-control have-goods" name="quarters_id" data-url="box/address/house/cxselect?type=quarters">
                </select>
                <select id="c-unit_id"  class="unit_id form-control" name="unit_id" data-url="box/address/house/cxselect?type=unit" data-query-name="quarters_id">
                </select>
                <select id="c-room_id"  class="room_id form-control" name="room_id" data-url="box/address/house/cxselect?type=room" data-query-name="unit_id">
                </select>
            </div>
        </div>
    </div>
    <div id="c-box-div" class="form-group" style="display: none;">
        <label class="control-label col-xs-12 col-sm-2">{:__('用户负责的盒子')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-box-no" data-rule="" class="form-control" name="row[box_nos]" row="30" col="60" ></textarea>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('row[status]', ['normal'=>__('Normal'), 'hidden'=>__('Hidden')])}
        </div>
    </div>
    <div class="form-group hidden layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>